-- GENERATED SPELL FOR [Horde Commander] --


function spell0_27947(pUnit, Event) --@Battle Shout,Self--
pUnit:FullCastSpellOnTarget(31403,pUnit)
pUnit:RegisterEvent('Sorts_27947', 588, 1)
end

function spell1_27947(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(60067,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27947', 2000, 1)
end

function spell2_27947(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_27947', 567, 1)
end

function spell3_27947(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_27947', 2000, 1)
end

function Sorts_27947(pUnit, Event)
local choix_sorts_27947 = math.random(0, 3)
if choix_sorts_27947 == 0 then
pUnit:RegisterEvent('spell0_27947', 1, 1)
end
if choix_sorts_27947 == 1 then
pUnit:RegisterEvent('spell1_27947', 1, 1)
end
if choix_sorts_27947 == 2 then
pUnit:RegisterEvent('spell2_27947', 1, 1)
end
if choix_sorts_27947 == 3 then
pUnit:RegisterEvent('spell3_27947', 1, 1)
end
end

function mob27947_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27947', math.random(1500, 3000), 1)
end

function mob27947_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27947_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27947_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27947, 1, 'mob27947_Action')
RegisterUnitEvent(27947, 2, 'mob27947_Leave')
RegisterUnitEvent(27947, 3, 'mob27947_Kill')
RegisterUnitEvent(27947, 4, 'mob27947_Die')
